<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/commons/global.jsp" %>
<script type="text/javascript">

    $(function() {
        $('#equedittypeid').combobox({
            url : '${path }/equipmenttype/eqtype',
            panelHeight : 'auto',
            valueField:'id',
            textField:'equipmenttypename',
            value : '${brand.equtypeid}'

        });
        $('#brandEditForm').form({
            url : '${path }/brand/update',

            onSubmit : function() {
                progressLoad();

                var isValid = $(this).form('validate');


                if (!isValid) {
                    progressClose();
                }

                return isValid;
            },
            success : function(result) {
                progressClose();
                result = $.parseJSON(result);
                if (result.success) {
                    parent.$.modalDialog.openner_dataGrid.datagrid('reload');//之所以能在这里调用到parent.$.modalDialog.openner_dataGrid这个对象，是因为user.jsp页面预定义好了
                    parent.$.modalDialog.handler.dialog('close');
                } else {
                    parent.$.messager.alert('错误', result.msg, 'error');
                }
            }
        });

    });

</script>


<form id="brandEditForm" >

    <input type="hidden" name="id" id="id" value="${brand.id}"/>
    <div class="form_item">
        <label>品牌名称:</label>
        <input type="text" name="brandname" class="easyui-textbox" value="${brand.brandname}"  />
    </div>
    <div class="form_item">
        <label style="display:inline-block;    width:80px;">产品类型:</label>
        <select id="equedittypeid" name="equtypeid" style="width: 160px;"  class="easyui-combobox"  >
        </select>
    </div>
</form>